﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LibNiconico.NiconicoApi.Internal;
using LibNiconico.NiconicoApi.Extentions;

namespace LibNiconico.NiconicoApi.Videos.WayBackKey
{
    /// <summary>
    /// ニコニコ動画過去コメント取得問い合わせ情報
    /// </summary>
    internal sealed class NicoVideoGetWayBackKeyQueryInfo:NicoUrlAble
    {
        /// <summary>
        /// スレッド番号
        /// </summary>
        internal string Thread { get; set; }

        /// <summary>
        /// 言語ID
        /// </summary>
        internal int LangageId { get; set; }

        /// <summary>
        /// コンストラクタ
        /// </summary>
        internal NicoVideoGetWayBackKeyQueryInfo(string thread):this(thread,0)
        {
        }

        internal NicoVideoGetWayBackKeyQueryInfo(string thread, int langageId)
        {
            this.Thread = thread;
            this.LangageId = langageId;
        }

        /// <summary>
        /// URLパスとして取得
        /// </summary>
        /// <returns></returns>
        internal override string AsPath()
        {
            return "api/getwaybackkey";
        }

        /// <summary>
        /// URL問い合わせ文字列として取得
        /// </summary>
        /// <returns></returns>
        internal override string AsQuery()
        {
            QueryStrings querys = new QueryStrings();
            querys.Add("thread", Thread);
            querys.Add("language_id", LangageId.ToString());
            return querys.ToString();
        }
    }
}
